{if count ($products)}
{literal}
<style type="text/css">
	#scrollingContainer{
		background-color: #FFFFFF;	/* Light blue background color */
		padding:0px;	/* A little bit of space between border of box and text inside */
		margin:0px;
		overflow:hidden;	/* Hide overflow content */
	}
	#scrollingContent{
    	padding:0px;
    	margin:0px;
    }
</style>
<script type="text/javascript">
	var slideSpeed = 5;
	var slideTimeBetweenSteps = 30;
	var scrollingContainer = false;
	var scrollingContent = false;
	var containerHeight;
	var contentHeight;	
	var contentObjects = new Array();
	var originalslideSpeed = false;
	function slideContent(containerId)
	{
    var topPos = contentObjects[containerId]['objRef'].style.top.replace(/[^\-0-9]/g,'');
		topPos = topPos - contentObjects[containerId]['slideSpeed'];
    if(topPos + contentObjects[containerId]['contentHeight']<0) topPos = contentObjects[containerId]['containerHeight'];
		contentObjects[containerId]['objRef'].style.top = parseInt(topPos) + 'px';
		setTimeout('slideContent("' + containerId + '")',slideTimeBetweenSteps);
	}
	
	function stopSliding()
	{
		var containerId = this.id;
		contentObjects[containerId]['slideSpeed'] = 0;	
	}
	
	function restartSliding()
	{
		var containerId = this.id;
		contentObjects[containerId]['slideSpeed'] = contentObjects[containerId]['originalSpeed'];
		
	}
	function initSlidingContent(containerId)
	{
		scrollingContainer = document.getElementById(containerId);
		scrollingContent = scrollingContainer.getElementsByTagName('DIV')[0];
		
		scrollingContainer.style.position = 'relative';
		scrollingContainer.style.overflow = 'hidden';
		scrollingContent.style.position = 'relative';
		
		scrollingContainer.onmouseover = stopSliding;
		scrollingContainer.onmouseout = restartSliding;
		
		originalslideSpeed = slideSpeed;
		
		scrollingContent.style.top = '0px';
		
		contentObjects[containerId] = new Array();
		contentObjects[containerId]['objRef'] = scrollingContent;
    contentObjects[containerId]['contentHeight'] = scrollingContent.offsetHeight;
		contentObjects[containerId]['containerHeight'] = scrollingContainer.clientHeight;
		contentObjects[containerId]['slideSpeed'] = slideSpeed;
		contentObjects[containerId]['originalSpeed'] = slideSpeed;
		
		slideContent(containerId);
		
	}
	
	</script>
{/literal}
<div id = "scrollingContainer" style = "position:relative; overflow:hidden; width:{$width}px; height:{$height}px">
<div id = "scrollingContent">
<table class = "unocart">
<tr>
    {foreach from=$products item=product name=prodfor}
      <td width = "{math equation="100/count" count=$count_product_to_row}%" class = "unocart_categ">
      <table class = "unocart">
        <tr>
          <td rowspan = "3" style="padding-right: 5px; vertical-align: top" width="20">
             <table class = "unocart">
               <tr>
                 <td style="padding: 2px;">
                   <a href="{$product->product_link}">
                     <img class = "unocart_img" src = "{$image_product_path}/{if $product->product_thumb_image}{$product->product_thumb_image}{else}{$no_image}{/if}" alt="{$product->product_name}" />
                   </a>
                 </td>
               </tr>
             </table>
          </td>
          <td style = "text-align: left; vertical-align: top; width: 75%; height: 20px; padding-top: 3px;">
            <a href="{$product->product_link}">
              {$product->product_name}
            </a>
          </td>
        </tr>
         <tr>
           <td style="padding-right: 20px; text-align: right; height: 24">
              <a href="{$product->product_link}">
                {format_price price = $product->product_price}
              </a>
           </td>
         </tr>
      </table>
      </td>
     {if $smarty.foreach.prodfor.iteration % $count_product_to_row == 0}
  </tr>
  <tr>
	 {/if}
   {/foreach}
</tr>
</table>
</div>
</div>
{/if}
{if $scroll}
{literal}

<script type="text/javascript">
  window.onload = function(){
    initSlidingContent('scrollingContainer', 3,30);
  }
</script>
{/literal}
{/if}